<template>
	<view>
		<uni-forms ref="form" @submit="submit">
			<uniCard title="HCP 基本信息" is-full>
				<uni-forms-item v-for="item in userDefinedForm.hcpInfo" required :label="item.name" :name="item.name" placeholder="请输入年龄" labelWidth="120">
					<input class="input" v-model="item.value" type="text" :placeholder="'请输入' + item.name" @input="binddata(item.name, $event.detail.value)" />
				</uni-forms-item>
			</uniCard>
			<uniCard title="参会人参会信息" is-full>
				<uni-forms-item v-for="item in userDefinedForm.participantInfo" required :label="item.name" :name="item.name" placeholder="请输入年龄" labelWidth="120">
					<input class="input" v-model="item.value" type="text" :placeholder="'请输入' + item.name" @input="binddata(item.name, $event.detail.value)" />
				</uni-forms-item>
			</uniCard>
			<uniCard title="HCP 负责人(员工)基本信息" is-full>
				<uni-forms-item v-for="item in userDefinedForm.staffInfo" required :label="item.name" :name="item.name" placeholder="请输入年龄" labelWidth="120">
					<input class="input" v-model="item.value" type="text" :placeholder="'请输入' + item.name" @input="binddata(item.name, $event.detail.value)" />
				</uni-forms-item>
			</uniCard>
			<view class="block">
				
			</view>
			<view class="submit_area">
				<button  @click="">保  存</button>
			</view>
		</uni-forms>
		
	</view>
</template>

<script>
import uniCard from '@/components/uni-card/uni-card.vue';
export default {
	data() {
		return {
			userDefinedForm: {
				//HCP 基本信息
				hcpInfo: [
					{
						name: 'UCI CODE', // inputLable的中文
						v_model: 'UCICode',
						value: '', // 输入框的值
						isNecessary: true, // 是否为必填项
						type: 'select', // 输入框的类型
						width: 24,
						tip: '123',
						option: ['1597322516523', '1597322531258']
					},
					{
						name: 'HCP 姓名', // inputLable的中文
						v_model: 'HCPName',
						value: '', // 输入框的值
						isNecessary: true, // 是否为必填项
						type: 'text' // 输入框的类型
					},
					{
						name: 'HCP 单位所在城市',
						v_model: 'HCPCompanyCity',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: 'HCP 性别',
						v_model: 'HCPGender',
						value: '',
						isNecessary: true,
						type: 'select',
						option: ['男', '女']
					},
					{
						name: 'HCP 所在城市',
						v_model: 'HCPCity',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: 'HCP 手机号',
						v_model: 'HCPMobile',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: 'HCP 所在医院',
						v_model: 'HCPHospital',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: 'HCP 证件类型',
						v_model: 'HCPIDType',
						value: '',
						isNecessary: true,
						type: 'select',
						option: ['身份证', '港澳通行证', '护照']
					},
					{
						name: 'HCP 在科室',
						v_model: 'HCPDepartment',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: 'HCP 证件号',
						v_model: 'HCPIDNo',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: 'HCP 职务',
						v_model: 'HCPJobTitle',
						value: '',
						isNecessary: true,
						type: 'text'
					}
				],
				//参会人参会信息
				participantInfo: [
					{
						name: '客户类型',
						v_model: 'AttendeeType',
						value: '',
						isNecessary: true,
						type: 'radio',
						option: ['HCP', '员工']
					},
					{
						name: 'HCP 是否需要陪同',
						v_model: 'IsHCPAccompanied',
						value: '',
						isNecessary: true,
						type: 'radio'
					},
					{
						name: '房间需求',
						v_model: 'RoomType',
						value: '',
						isNecessary: true,
						type: 'radio',
						option: ['单间', '标间']
					},
					{
						name: '是否为本次会议主席/讲者',
						v_model: 'IsSpeaker',
						value: '',
						isNecessary: true,
						type: 'radio'
					},
					{
						name: '同住人',
						v_model: 'RoomShareWith',
						value: '',
						isNecessary: true,
						type: 'radio',
						option: ['随机安排', '有']
					},
					{
						name: '火车票是否接受二等座',
						v_model: 'IsHCPAccept2ndSeat',
						value: '',
						isNecessary: true,
						type: 'radio'
					},
					{
						name: '是否需要大交通',
						v_model: 'IsNeedBigTransportation',
						value: '',
						isNecessary: true,
						type: 'radio',
						hasCheck: true,
						checkList: [{ 飞机: true }, { 火车: true }]
					},
					{
						name: '是否参加晚宴',
						v_model: 'IsHCPAttendDinnerParty',
						value: '',
						isNecessary: true,
						type: 'radio'
					}
				],
				// HCP 负责人（员工）基本信息
				staffInfo: [
					{
						name: '负责同事姓名',
						v_model: 'StaffName',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: '所属销售区域会议状态',
						v_model: 'SalesRegion',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: '负责同事手机号',
						v_model: 'StaffMobile',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: '火车票是否接受二等座',
						v_model: 'IsStaffAccept2ndSeat',
						value: '',
						isNecessary: true,
						type: 'radio'
					},
					{
						name: '现场陪同人员',
						v_model: 'StaffNameInMeeting',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: '员工是否参加晚宴',
						v_model: 'IsStaffAttendDinnerParty',
						value: '',
						isNecessary: true,
						type: 'radio'
					},
					{
						name: '现场陪同人员手机号',
						v_model: 'StaffMobileInMeeting',
						value: '',
						isNecessary: true,
						type: 'text'
					},
					{
						name: '备注',
						v_model: 'Remark',
						value: '',
						isNecessary: true,
						type: 'text'
					}
				]
			}
		};
	},
	methods: {},
	components: {
		uniCard
	}
};
</script>

<style lang="scss">
/deep/ .uni-forms-item{
		font-size: 14px;
		.fild-body{
			.input{
				width: 100%;
				text-align: right;
				font-size: 14px;
			}
		}
	}
.submit_area{
	position: fixed;
	bottom: 0;
	z-index: 10;
	width: 100%;
	background-color: #fff;
	height: 46px;
	text-align: right;
	border-top: 1px solid #e5e5e5;
	button{
		background-color: #5BC579;
		border-radius: 0;
		width: 90px;
		color:#fff;
		margin-right: 0;
	}
}
.block{
	height: 40px;
}
</style>
